//
//  RHMQTTManage.h
//  RuiHeAppApp
//
//  Created by Jun on 2023/8/11.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

//设备状态变更
static NSString *const DeviecStateChangeNotification = @"DeviecStateChangeNotification";
//设备收到下行数据
static NSString *const DeviecNewMsgNotification = @"DeviecNewMsgNotification";

typedef void (^resultCallBack)(BOOL isSuccess);

@class RHMQDevModel;

@interface RHMQTTManage : NSObject
//域名
@property (nonatomic ,copy) NSString *mqtt_host;
//端口
@property (nonatomic ,assign) UInt32 mqtt_port;
//设备
@property (nonatomic,nullable,strong) RHMQDevModel *devModel;


+ (RHMQTTManage *)shareMQTTManage;

//批量连接
- (void)multipleContentMqtt:(NSInteger)count ueseName:(NSString *)name  password:(NSString *)password;
//连接
- (void)connectMqtt:(resultCallBack)result;
//断开连接
- (void)disConnectMqtt:(resultCallBack)result;
//发送消息
- (void)sendMessage:(NSString *)msg handler:(resultCallBack)result;

//向某一主题发送消息
- (void)sendMessage:(NSString *)msg topicSN:(NSString*)topicSN handler:(resultCallBack)result;
@end

NS_ASSUME_NONNULL_END
